home *** CD-ROM | disk | FTP | other *** search
/ USGS: Oil & Gas Potential…National Wildlife Refuge / USGS - Oil & Gas Potential of the Arctic National Wildlife Refuge - Disc 2.iso / mac / MEcode / MERefPr.for < prev    next >
Text File  |  1999-02-11  |  2KB  |  159 lines

  1. c   MERefPr.for, Reformats Excel ANWR1_VBA prospect output
  2.  
  3. c    file, ProspData for use in economic analysis
  4.  
  5. c    program.
  6.  
  7. c   Writen by Schuenemeyer 3/6/98
  8.  
  9. c
  10.  
  11. c   Input file: ProspData (contains successful prospect
  12.  
  13. c    information from ANWR1 play simulation.
  14.  
  15. c
  16.  
  17. c   Output file: Contains recoverable oil/gas and other
  18.  
  19. c    infomation on prospects (see labels).
  20.  
  21. c
  22.  
  23. c   Temporary file created and used: tmp.tmp
  24.  
  25. c
  26.  
  27.       character id*80,fn*20,varno*38,varng*38,outf*24
  28.  
  29.       dimension nn(3),x(8),varno(12),varng(12)
  30.  
  31.       integer*2 nb(10000)
  32.  
  33. c   Labels for output file
  34.  
  35.       data varno/'Simulation Num',
  36.  
  37.      1 'Num of Prospects',
  38.  
  39.      2 'Prospect Num',
  40.  
  41.      3 'Oil=1 or Gas=2',
  42.  
  43.      4 'Recoverable Oil(mm bbl) or Gas(b cf)',
  44.  
  45.      5 'Area, 1000 acres',
  46.  
  47.      6 'Depth from surface, 1000 ft',
  48.  
  49.      7 'for Oil-Assoc disolved gas, b cf',
  50.  
  51.      8 'for Oil-NGL from assoc-dis gas, mm bbl',
  52.  
  53.      9 'for Oil-Formation volume factor',
  54.  
  55.      a 'for Oil-GOR, cf/bbl at stp',
  56.  
  57.      b 'NGL ratio, bbl/mm cf'/
  58.  
  59.       data varng/'',
  60.  
  61.      1 '',
  62.  
  63.      2 '',
  64.  
  65.      3 '',
  66.  
  67.      4 '',
  68.  
  69.      5 '',
  70.  
  71.      6 '',
  72.  
  73.      7 'for Gas-NGL recover from NA gas,mm bbl',
  74.  
  75.      8 'for Gas-Orig reservoir pressure, psi',
  76.  
  77.      9 'for Gas-Temperature, deg Rankine',
  78.  
  79.      a 'for Gas-Gas compressibility',
  80.  
  81.      b ''/
  82.  
  83.     data outf/'(i6,2i4,i2,f11.4,7f10.3)'/
  84.  
  85.     nvar=12
  86.  
  87.      knt=0
  88.  
  89.       open(8,file='ProspData')
  90.  
  91.       write(*,*)' Enter full output file name'
  92.  
  93.       read(*,'(a20)')fn
  94.  
  95.       open(9,file='tmp.tmp')
  96.  
  97.       open(10,file=fn)
  98.  
  99.       call getdat(iyrx,imonx,idayx)
  100.  
  101. c   read ProspData file
  102.  
  103.       read(8,'(a80)')id
  104.  
  105.    10 read(8,*,end=50) nn,x
  106.  
  107.       knt=knt+1
  108.  
  109.       write(9,25) nn,x
  110.  
  111.    25 format(i6,i4,i2,f11.4,7f10.3)
  112.  
  113.       it=nn(1)
  114.  
  115.       nb(it)=nn(2)
  116.  
  117.       goto 10
  118.  
  119.    50 close (9)
  120.  
  121. c   create a file with recoverable oil and gas data
  122.  
  123.       write(10,52)fn, imonx,idayx,iyrx
  124.  
  125.    52 format('File:',a20,2x,'MMDDYYYY=',2i2.2,i4,3x,
  126.  
  127.      1 'All Oil and Gas Recoverable')
  128.  
  129.         write(10,54)nvar,knt,outf
  130.  
  131.    54 format(i3,i10,3x,a24,2x,'Num of variables, Num of observ',
  132.  
  133.      1  2x,'Format')
  134.  
  135.       do i =1, nvar
  136.  
  137.        write(10,'(a38,2x,a38)')varno(i),varng(i)
  138.  
  139.       end do
  140.  
  141.       open(9,file='tmp.tmp')
  142.  
  143.    60 read(9,25,end=100)nn,x
  144.  
  145.       it=nn(1)
  146.  
  147.       write(10,64)it,nb(it),nn(2),nn(3),x
  148.  
  149.    64 format(i6,2i4,i2,f11.4,7f10.3)
  150.  
  151.       goto 60
  152.  
  153.   100 write(*,*)' Num Records',knt
  154.  
  155.       stop
  156.  
  157.       END
  158.  
  159.